package thread;

public class ThreadTest implements Runnable {

	public String name;
	
	public ThreadTest(String name) {
		this.name = name;
	}
	
	@Override
	public void run() {
		while (true) {
			System.out.println(name);
		}

		
	}
	
	public static void main(String[] args) {
		ThreadTest test1 = new ThreadTest("thread1");
		ThreadTest test2 = new ThreadTest("thread2");
		Thread t1 = new Thread(test1);
		Thread t2 = new Thread(test2);
		t1.start();
		t2.start();
	}
	
}
